#pragma once

#include <iostream>
#include "../PortAudio/portaudio/portaudio.h"
#include "exception.h"

#include "IAudio.h"
#include "IAudioStream.h"
#include "AudioStream.h"

class Audio : public IAudio
{
public:
	Audio(void);
	virtual ~Audio(void);

	virtual int				Initialize();
	virtual AudioStream		*OpenStream(StreamType type, void *config, void *callback, void *data);
	virtual int				CloseStream(IAudioStream *audioStream);
	virtual int				Terminate();
	virtual bool			IsInitialized();

private:
	PaError				state;
	AudioStream			*inputStream;
	AudioStream			*outputStream;
	bool				initialize;
};